
import { _decorator, Component, Node, TypeScript, Button, Animation } from 'cc';
import { Jump } from "./PlayerStatus"
const { ccclass, property } = _decorator;


@ccclass('PlayerAnime')
export class PlayerAnime extends Component {

    private animation: Animation | null = null;
    onLoad() {
        this.animation = this.getComponent(Animation);
        
    }
    update(){
        if(Jump.isJump) this.animation.play('animation_player');
    }

}

